package com.example.service.Impl;

import com.example.Dto.EmpDto;
import com.example.Dto.EmpDto1;
import com.example.entity.Emp;

import com.example.mapper.EmpMapper;
import com.example.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class empServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;
    @Override
    public Emp login_h2_16(EmpDto empDto){
        String empidH216 = empDto.getEmpidH216();
        Emp emp1 = Emp.builder()
                .empidH216(empDto.getEmpidH216())
                .name(empDto.getName())
                .build();
        Emp emp=empMapper.getByEmpid_h2_16(emp1);

        return emp;
    }

    @Override
    public void regiter_h2_16(EmpDto1 empDto1) {
        empMapper.InsertRegiter_h2_16(empDto1);
    }
}
